﻿<%@ Page Language="C#" ValidateRequest="false" MasterPageFile="~/Include/Admin.master"
    AutoEventWireup="true" CodeFile="Manage.aspx.cs" Inherits="Admin_Product_Manage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link href="/Style/DatePage.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table class="editTable" align="center" width="100%" cellpadding="0" cellspacing="1">
        <tr style="background-image: url('/images/管理员页面/title_bg1.jpg'); background-repeat: repeat-x;">
            <td colspan="8" style="font-weight: bold; font-size: large; font-family: 仿宋;">
                <strong class="style1">-商品管理中心</strong>
            </td>
        </tr>
        <tr>
            <th>
                商品主分类：
            </th>
            <td>
                <asp:DropDownList ID="drpZhuFenLei" runat="server" Height="20px" Width="100px" OnTextChanged="drpZhuFenLei_TextChanged"
                    AutoPostBack="true">
                </asp:DropDownList>
            </td>
            <th>
                商品次分类：
            </th>
            <td>
                <asp:DropDownList ID="drpCiFenLei" runat="server" Height="20px" Width="100px" OnTextChanged="drpCiFenLei_TextChanged"
                    AutoPostBack="true">
                </asp:DropDownList>
            </td>
            <th>
                商品分类：
            </th>
            <td>
                <asp:DropDownList ID="drpFenLei" runat="server" Height="20px" Width="100px">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <th>
                所属品牌：
            </th>
            <td>
                <asp:DropDownList ID="drpPinPai" runat="server" Height="20px" Width="100px">
                </asp:DropDownList>
            </td>
            <th>
                关键字：
            </th>
            <td>
                <asp:TextBox ID="txtKey" runat="server" Height="20px" Width="200px"></asp:TextBox>
            </td>
            <th>
                积分
            </th>
            <td>
                <asp:TextBox ID="txtJiFenFrom" runat="server" Height="21px" Width="100px"></asp:TextBox>
                --<asp:TextBox ID="txtJiFenTo" runat="server" Height="21px" Width="100px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <th>
                价格：
            </th>
            <td>
                <asp:TextBox ID="txtJiaGeFrom" runat="server" Height="21px" Width="100px"></asp:TextBox>
                --<asp:TextBox ID="txtJiaGeTo" runat="server" Height="21px" Width="100px"></asp:TextBox>
            </td>
            <th>
                市场价
            </th>
            <td>
                <asp:TextBox ID="txtSCJFrom" runat="server" Height="21px" Width="100px"></asp:TextBox>
                --<asp:TextBox ID="txtSCJTo" runat="server" Height="21px" Width="100px"></asp:TextBox>
            </td>
            <td colspan="2">
                <asp:Button ID="btn_search_Click" runat="server" Text="开始搜索" OnClick="btn_search_Click_Click" />
            </td>
        </tr>
    </table>
    <h4>
        <a href="AddProduct.aspx">添加新商品</a>
    </h4>
    <asp:ListView ID="lvShangPin" runat="server" DataKeyNames="ID" OnPagePropertiesChanged="lvShangPin_PagePropertiesChanged"
        OnItemDeleting="lvShangPin_ItemDeleting">
        <LayoutTemplate>
            <table width="100%" class="editTable" cellspacing="1">
                <th>
                    商品编号
                </th>
                <th>
                    商品名称
                </th>
                <th>
                    商品主分类
                </th>
                <th>
                    商品次分类
                </th>
                <th>
                    商品分类
                </th>
                <th>
                    价格
                </th>
                <th>
                    品牌
                </th>
                <th>
                    市场价
                </th>
                <th>
                    商品积分
                </th>
                <th>
                    产品数量
                </th>
                <th>
                    商品介绍
                </th>
                <th>
                    操作
                </th>
                <asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>
            </table>
        </LayoutTemplate>
        <ItemTemplate>
            <tr>
                <td>
                    <%#Eval("ProductID")%>
                </td>
                <td>
                    <%# Eval("Title")%>
                </td>
                <td>
                    <%#ReturnName(Eval("RootID"))%>
                </td>
                <td>
                    <%#ReturnName(Eval("ParentID"))%>
                </td>
                <td>
                    <%#ReturnName(Eval("NavaID"))%>
                </td>
                <td>
                    <%# Eval("Price")%>
                </td>
                <td>
                    <%#ReturnPinPai(Eval("BrandID"))%>
                </td>
                <td>
                    <%#Eval("PubPrice")%>
                </td>
                <td>
                    <%#Eval("JiFen")%>
                </td>
                <td>
                    <%# Eval("Num")%>
                </td>
                <td>
                    <%#DongDong.Common.Misc.MaxCharacters(DongDong.Common.Misc.ClearHtml(Eval("Des")), 50)%>
                </td>
                <td>
                    <a href="../Comment/Manage.aspx?PID=<%#Eval("ID") %>">相关评论</a> <a href="AddProduct.aspx?ID=<%#Eval("ID") %>">
                        修改</a>
                    <asp:LinkButton ID="lbtnDelete" runat="server" Text="删除" OnClientClick="return confirm('您是否确定删除?');"
                        CommandName="Delete" CommandArgument='<%#Eval("ID")%>'></asp:LinkButton>
                </td>
            </tr>
        </ItemTemplate>
    </asp:ListView>
    <div style="padding: 4px; text-align: center;">
        <asp:DataPager ID="Pager" runat="server" PagedControlID="lvShangPin" OnPreRender="Pager_PreRender"
            PageSize="20">
            <Fields>
                <asp:NumericPagerField ButtonCount="10" CurrentPageLabelCssClass="CurrentPage" NumericButtonCssClass="Page" />
                <asp:NextPreviousPagerField ShowLastPageButton="true" ShowPreviousPageButton="true"
                    ShowFirstPageButton="true" />
                <asp:TemplatePagerField>
                    <PagerTemplate>
                        共<%=Pager.TotalRowCount%>条
                    </PagerTemplate>
                </asp:TemplatePagerField>
            </Fields>
        </asp:DataPager>
    </div>
</asp:Content>
